package com.example.testelc.domain;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @Author: 普发忠
 * @Date: 2021/11/05/15:37
 */
@Data
@Document(indexName = "user")
public class User {
    @Id
    private Integer id;
    @Field(type = FieldType.Auto)
    private Integer age;
    @Field(type = FieldType.Keyword)
    private String name;
@Field(type = FieldType.Text,analyzer = "ik_smart",searchAnalyzer = "ik_max_word")
    private String info;
}
